package nc.impl.dm.m4804.rule;

import nc.impl.pubapp.pattern.rule.IRule;
import nc.vo.dm.enumeration.FstatusFlag;
import nc.vo.dm.m4804.entity.DelivBillAggVO;
import nc.vo.dm.m4804.entity.DelivBillHVO;
import nc.vo.ml.NCLangRes4VoTransl;
import nc.vo.pubapp.pattern.data.ValueUtils;
import nc.vo.pubapp.pattern.exception.ExceptionUtils;









public class CheckStateRuleForEdit implements IRule<DelivBillAggVO> {
  public void process(DelivBillAggVO[] vos) {
    for (DelivBillAggVO vo : vos) {
      DelivBillHVO hvo = vo.getParentVO();
      int flag = hvo.getFstatusflag().intValue();

      if (ValueUtils.getInt(FstatusFlag.FREE.value()) != flag)

        ExceptionUtils.wrappBusinessException(NCLangRes4VoTransl.getNCLangRes()
            .getStrByID("4014001_0", "04014001-0341")); 
    } 
  }
}

